<template>
  <div>
    <ComponentB
      :name="name"
      :age="age"
      :state="state"
      @test1-component-b="onTest1"
      @test2-component-c="onTest2"
      @trigger-state="triggerState"
    ></ComponentB>
  </div>
</template>
<script>
import ComponentB from './ComponentB'
export default {
  components: { ComponentB },
  data () {
    return {
      name: 'bolean',
      age: 3,
      state: false
    }
  },
  methods: {
    onTest1 () {
      console.log('test1 running....')
    },
    onTest2 () {
      console.log('test2 running....')
    },
    triggerState () {
      this.state = !this.state
      console.log(this.state)
    }
  }
}
</script>
